<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2014.07.11.
   家居公司联系方式($$)*/

!defined('Q_PATH') && exit;

class Contact_C_Controller extends InitController{

	public function index(){
		$arrJiajucompany=$this->_oParent->_arrJiajucompany;
		
		Core_Extend::getSeo($this,array(
			'title'=>"{$arrJiajucompany['jiajucompany_fullname']}联系方式",
			'keywords'=>"{$arrJiajucompany['jiajucompany_fullname']}联系方式",
			'description'=>"{$arrJiajucompany['jiajucompany_fullname']}的联系方式，通过该内容您可以与该公司取得联系，以便于咨询该公司提供的产品与服务。",
		));

		// 读取地址
		$arrDistricts=Model::F_('jiajucompany','@A')->setColumns('')
			->where(array('A.jiajucompany_id'=>$arrJiajucompany['jiajucompany_id']))
			->join(Q::C('DB_PREFIX').'district AS B','B.district_name AS province_name','A.province_id=B.district_id')
			->join(Q::C('DB_PREFIX').'district AS C','C.district_name AS city_name','A.city_id=C.district_id')
			->joinLeft(Q::C('DB_PREFIX').'district AS D','D.district_name AS district_name','A.district_id=D.district_id')
			->joinLeft(Q::C('DB_PREFIX').'district AS E','E.district_name AS community_name','A.community_id=E.district_id')
			->getOne();

		$this->assign('sDistrict',implode(',&nbsp;',Q::normalize($arrDistricts)));
		$this->display(Jiaju_Extend::getTemplate($arrJiajucompany));
	}

}
